import { request } from './axios'
import apiList from './apiList';

export const uploadFile = (data, params) => {
    // console.log(data);
    // let axiosData = new FormData()
    // Object.keys(data).forEach(key => {
    //     axiosData.append(key, data[key])
    // })
    return request({
        url: apiList.base.uploadFile,
        data,
        apiType: 'upload',
        ...params
    });
}

export const baiduDiyIocr = (data, params) => {
    return request({
        url: apiList.base.baiduDiyIocr,
        data,
        apiType: 'upload',
        ...params
    });
}

export const getKtIocrResult = (data, params) => {
    return request({
        url: apiList.base.getKtIocrResult,
        data,
        apiType: "upload",
        ...params,
    });
};
